# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=pixman

pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=0.32.4
pkgrel=2
pkgdesc="The pixel-manipulation library for X and cairo (mingw-w64)"
arch=('any')
url="http://xorg.freedesktop.org"
license=("custom")
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-libpng")
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs")
options=('staticlibs' 'strip')
source=("http://xorg.freedesktop.org/releases/individual/lib/pixman-${pkgver}.tar.bz2")
sha1sums=('e2708db16595412e5aaf21a66b6f18b7223eb6c3')

build() {
    mkdir -p "${srcdir}/build-${MINGW_CHOST}"
    cd "${srcdir}/build-${MINGW_CHOST}"
    "${srcdir}"/${_realname}-${pkgver}/configure \
      --prefix=${MINGW_PREFIX} \
      --build=${MINGW_CHOST} \
      --host=${MINGW_CHOST} \
      --disable-gtk
    make
}

package() {
    cd "${srcdir}/build-${MINGW_CHOST}"
    make DESTDIR="$pkgdir" install
}
